<%--
  Created by IntelliJ IDEA.
  User: 喝假酒的ywj
  Date: 2020/3/6
  Time: 20:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>i movie</title>
    <script src="${pageContext.request.contextPath}/js/jquery-3.4.1.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/nprogress.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/nprogress.css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/movie.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.min.css" />
    <script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap-paginator.js"></script>
    <script src="${pageContext.request.contextPath}/js/template-web.js"></script>
    <script>
        $(function () {
            $('#planPlay').hide();
            $('#classicPlay').hide();
            let tab = getUrlParam('tab');

            let hotType = localStorage.getItem("hotType")||'';
            $('#typeTagsHot li').removeClass('active');
            $('#typeTagsHot li').eq(parseInt(hotType)).addClass("active");
            let hotYear = localStorage.getItem("hotYear")||'';
            let hotCountry = localStorage.getItem("hotCountry")||'';
            $('#areaTagsHot li').removeClass('active');
            $('#areaTagsHot li').eq(parseInt(hotCountry)).addClass("active");
            $('#yearTagsHot li').removeClass('active');
            $('#yearTagsHot li').eq(parseInt(hotYear)).addClass('active');

            let planType = localStorage.getItem("planType")||'';
            $('#typeTagsPlan li').removeClass('active');
            $('#typeTagsPlan li').eq(parseInt(planType)).addClass("active");
            let planYear = localStorage.getItem("planYear")||'';
            let planCountry = localStorage.getItem("planCountry")||'';
            $('#areaTagsPlan li').removeClass('active');
            $('#areaTagsPlan li').eq(parseInt(planCountry)).addClass("active");
            $('#yearTagsPlan li').removeClass('active');
            $('#yearTagsPlan li').eq(parseInt(planYear)).addClass('active');

            let goodType = localStorage.getItem("goodType")||'';
            $('#typeTagsClassic li').removeClass('active');
            $('#typeTagsClassic li').eq(parseInt(goodType)).addClass("active");
            let goodYear = localStorage.getItem("goodYear")||'';
            let goodCountry = localStorage.getItem("goodCountry")||'';
            $('#areaTagsClassic li').removeClass('active');
            $('#areaTagsClassic li').eq(parseInt(goodYear)).addClass("active");
            $('#yearTagsClassic li').removeClass('active');
            $('#yearTagsClassic li').eq(parseInt(goodCountry)).addClass('active');
            if(tab==0){
                console.log(0);
                $('#hotPlay').show();
                $('#planPlay').hide();
                $('#classicPlay').hide();
                $('.navbar-tab').find("a").removeClass('active');
                $('.navbar-tab').find("a").eq(0).addClass('active');
            }
            if(tab==1){
                console.log(1);
                $('#hotPlay').hide();
                $('#planPlay').show();
                $('#classicPlay').hide();
                $('.navbar-tab').find("a").removeClass('active');
                $('.navbar-tab').find("a").eq(1).addClass('active');
            }
            if(tab==2){
                console.log(2);
                $('#hotPlay').hide();
                $('#planPlay').hide();
                $('#classicPlay').show();
                $('.navbar-tab').find("a").removeClass('active');
                $('.navbar-tab').find("a").eq(2).addClass('active');
            }
            $('.navbar-tab').click(function () {
                $('.navbar-tab').find("a").removeClass('active');
                $(this).find('a').addClass('active');
                let index = $(this).index();
                if(index===0){
                   location.href="${pageContext.request.contextPath}/front/movie/movie?tab=0"
                }
                if(index===1){
                    location.href="${pageContext.request.contextPath}/front/movie/movie?tab=1"
                }
                if(index===2){
                    location.href="${pageContext.request.contextPath}/front/movie/movie?tab=2"
                }
            });
            $('#typeTagsHot li').click(function () {
                $('#pagination1').remove();
                NProgress.start();
                $('#typeTagsHot li').removeClass('active');
                $(this).addClass('active');
                let types = $(this).text();
                if (types==="全部"){
                    types='';
                }
                let country = $(this).parent().parent().next().find('li.active').data("countryid");
                let year = $(this).parent().parent().next().next().find('li.active').data("year");
                localStorage.setItem("hotType",$(this).index());
                localStorage.setItem("hotYear",$(this).parent().parent().next().next().find('li.active').index());
                localStorage.setItem("hotCountry",$(this).parent().parent().next().find('li.active').index());
                $.ajax({
                    url:'${pageContext.request.contextPath}/front/movie/searchWithQuery',
                    async:true,
                    data:{country:country,year:year,type:types},
                    dataType: "json",
                    success:function (data) {
                        NProgress.done();
                        var html = template('temp1',{list:data.data.list});
                        $('#movieList1').html(html);
                        if(data.data.total!=0){
                            $('#footer').removeClass('fix');
                            $('#pagination11').show();
                            $('#pagination11').bootstrapPaginator({
                                //主版本号
                                bootstrapMajorVersion: 3,
                                //当前页
                                currentPage: data.data.pageNum,
                                //总页数
                                totalPages: data.data.pages,

                                //显示分页条信息
                                itemTexts: function (type, page, current) {
                                    switch (type) {
                                        case "first":
                                            return "首页";
                                        case "prev":
                                            return "上一页";
                                        case "next":
                                            return "下一页";
                                        case "last":
                                            return "尾页";
                                        case "page":
                                            return page;
                                    }
                                },
                                onPageClicked:function (event, originalEvent, type, page) {
                                    $.ajax({
                                        url:'${pageContext.request.contextPath}/front/movie/searchWithQuery',
                                        async:true,
                                        data:{country:country,year:year,type:types,pageNum:page},
                                        dataType: "json",
                                        success:function (data) {
                                            var html = template('temp1',{list:data.data.list});
                                            $('#movieList1').html(html);
                                        }
                                    })
                                },
                            });
                        }else{
                            $('#pagination11').hide();
                            $('#footer').addClass('fix');
                            $('#movieList1').html('<div style="margin-left: 30px;margin-top: 30px">暂无数据</div>');
                        }
                    }
                })
            });
            $('#areaTagsHot li').click(function () {
                $('#areaTagsHot li').removeClass('active');
                $(this).addClass('active');
                $('#pagination1').remove();
                NProgress.start();
                let country = $(this).data("countryid");
                let types  = $(this).parent().parent().prev().find('li.active a').text();
                if (types==="全部"){
                    types='';
                }
                let year = $(this).parent().parent().next().find('li.active').data("year");
                localStorage.setItem("hotType",$(this).parent().parent().prev().find('li.active').index());
                localStorage.setItem("hotYear",$(this).parent().parent().next().find('li.active').index());
                localStorage.setItem("hotCountry",$(this).index());
                //console.log(types,country,year)
                $.ajax({
                    url:'${pageContext.request.contextPath}/front/movie/searchWithQuery',
                    async:true,
                    data:{country:country,year:year,type:types},
                    dataType: "json",
                    success:function (data) {
                        NProgress.done();
                        var html = template('temp1',{list:data.data.list});
                        $('#movieList1').html(html);
                        if(data.data.total!=0){
                            $('#footer').removeClass('fix');
                            $('#pagination11').show();
                            $('#pagination11').bootstrapPaginator({
                                //主版本号
                                bootstrapMajorVersion: 3,
                                //当前页
                                currentPage: data.data.pageNum,
                                //总页数
                                totalPages: data.data.pages,

                                //显示分页条信息
                                itemTexts: function (type, page, current) {
                                    switch (type) {
                                        case "first":
                                            return "首页";
                                        case "prev":
                                            return "上一页";
                                        case "next":
                                            return "下一页";
                                        case "last":
                                            return "尾页";
                                        case "page":
                                            return page;
                                    }
                                },
                                onPageClicked:function (event, originalEvent, type, page) {
                                    $.ajax({
                                        url:'${pageContext.request.contextPath}/front/movie/searchWithQuery',
                                        async:true,
                                        data:{country:country,year:year,type:types,pageNum:page},
                                        dataType: "json",
                                        success:function (data) {
                                            var html = template('temp1',{list:data.data.list});
                                            $('#movieList1').html(html);
                                        }
                                    })
                                },
                            });
                        }else{
                            $('#pagination11').hide();
                            $('#footer').addClass('fix');
                            $('#movieList1').html('<div style="margin-left: 30px;margin-top: 30px">暂无数据</div>');
                        }
                    }
                });
            });
            $('#yearTagsHot li').click(function () {
                NProgress.start();
                $('#yearTagsHot li').removeClass('active');
                $(this).addClass('active');
                $('#pagination1').remove();
                let country = $(this).parent().parent().prev().find('li.active').data("countryid");
                let types  = $(this).parent().parent().prev().prev().find('li.active a').text();
                if (types==="全部"){
                    types='';
                }
                let year = $(this).data("year");
                localStorage.setItem("hotType",$(this).parent().parent().prev().prev().find('li.active').index());
                localStorage.setItem("hotYear",$(this).index());
                localStorage.setItem("hotCountry",$(this).parent().parent().prev().find('li.active').index());
                console.log(types,country,year)
                $.ajax({
                    url:'${pageContext.request.contextPath}/front/movie/searchWithQuery',
                    async:true,
                    data:{country:country,year:year,type:types},
                    dataType: "json",
                    success:function (data) {
                        NProgress.done();
                        var html = template('temp1',{list:data.data.list});
                        $('#movieList1').html(html);
                        if(data.data.total!=0){
                            $('#footer').removeClass('fix');
                            $('#pagination11').show();
                            $('#pagination11').bootstrapPaginator({
                                //主版本号
                                bootstrapMajorVersion: 3,
                                //当前页
                                currentPage: data.data.pageNum,
                                //总页数
                                totalPages: data.data.pages,

                                //显示分页条信息
                                itemTexts: function (type, page, current) {
                                    switch (type) {
                                        case "first":
                                            return "首页";
                                        case "prev":
                                            return "上一页";
                                        case "next":
                                            return "下一页";
                                        case "last":
                                            return "尾页";
                                        case "page":
                                            return page;
                                    }
                                },
                                onPageClicked:function (event, originalEvent, type, page) {
                                    $.ajax({
                                        url:'${pageContext.request.contextPath}/front/movie/searchWithQuery',
                                        async:true,
                                        data:{country:country,year:year,type:types,pageNum:page},
                                        dataType: "json",
                                        success:function (data) {
                                            var html = template('temp1',{list:data.data.list});
                                            $('#movieList1').html(html);
                                        }
                                    })
                                },
                            });
                        }else{
                            $('#pagination11').hide();
                            $('#footer').addClass('fix');
                            $('#movieList1').html('<div style="margin-left: 30px;margin-top: 30px">暂无数据</div>');
                        }
                    }
                });
            });
            $('#typeTagsPlan li').click(function () {
                $('#pagination2').remove();
                $('#typeTagsPlan li').removeClass('active');
                $(this).addClass('active');
                NProgress.start();
                let types = $(this).text();
                if (types==="全部"){
                    types='';
                }
                let country = $(this).parent().parent().next().find('li.active').data("countryid");
                let year = $(this).parent().parent().next().next().find('li.active').data("year");
                localStorage.setItem("planType",$(this).index());
                localStorage.setItem("planYear",$(this).parent().parent().next().next().find('li.active').index());
                localStorage.setItem("planCountry",$(this).parent().parent().next().find('li.active').index());
                $.ajax({
                    url:'${pageContext.request.contextPath}/front/movie/searchWithQuery2',
                    async:true,
                    data:{country:country,year:year,type:types},
                    dataType: "json",
                    success:function (data) {
                        NProgress.done();
                        var html = template('temp1',{list:data.data.list});
                        $('#movieList2').html(html);
                        if(data.data.total!=0){
                            $('#footer').removeClass('fix');
                            $('#pagination22').show();
                            $('#pagination22').bootstrapPaginator({
                                //主版本号
                                bootstrapMajorVersion: 3,
                                //当前页
                                currentPage: data.data.pageNum,
                                //总页数
                                totalPages: data.data.pages,

                                //显示分页条信息
                                itemTexts: function (type, page, current) {
                                    switch (type) {
                                        case "first":
                                            return "首页";
                                        case "prev":
                                            return "上一页";
                                        case "next":
                                            return "下一页";
                                        case "last":
                                            return "尾页";
                                        case "page":
                                            return page;
                                    }
                                },
                                onPageClicked:function (event, originalEvent, type, page) {
                                    $.ajax({
                                        url:'${pageContext.request.contextPath}/front/movie/searchWithQuery2',
                                        async:true,
                                        data:{country:country,year:year,type:types,pageNum:page},
                                        dataType: "json",
                                        success:function (data) {
                                            var html = template('temp1',{list:data.data.list});
                                            $('#movieList2').html(html);
                                        }
                                    })
                                },
                            });
                        }else{
                            $('#pagination22').hide();
                            $('#footer').addClass('fix');
                            $('#movieList2').html('<div style="margin-left: 30px;margin-top: 30px">暂无数据</div>');
                        }
                    }
                })
            });
            $('#areaTagsPlan li').click(function () {
                $('#pagination2').remove();
                $('#areaTagsPlan li').removeClass('active');
                $(this).addClass('active');
                NProgress.start();
                let country = $(this).data("countryid");
                let types  = $(this).parent().parent().prev().find('li.active a').text();
                if (types==="全部"){
                    types='';
                }
                let year = $(this).parent().parent().next().find('li.active').data("year");
                localStorage.setItem("planType",$(this).parent().parent().prev().find('li.active').index());
                localStorage.setItem("planYear",$(this).parent().parent().next().find('li.active').index());
                localStorage.setItem("planCountry",$(this).index());
                //console.log(types,country,year)
                $.ajax({
                    url:'${pageContext.request.contextPath}/front/movie/searchWithQuery2',
                    async:true,
                    data:{country:country,year:year,type:types},
                    dataType: "json",
                    success:function (data) {
                        NProgress.done();
                        var html = template('temp1',{list:data.data.list});
                        $('#movieList2').html(html);
                        if(data.data.total!=0){
                            $('#footer').removeClass('fix');
                            $('#pagination22').show();
                            $('#pagination22').bootstrapPaginator({
                                //主版本号
                                bootstrapMajorVersion: 3,
                                //当前页
                                currentPage: data.data.pageNum,
                                //总页数
                                totalPages: data.data.pages,

                                //显示分页条信息
                                itemTexts: function (type, page, current) {
                                    switch (type) {
                                        case "first":
                                            return "首页";
                                        case "prev":
                                            return "上一页";
                                        case "next":
                                            return "下一页";
                                        case "last":
                                            return "尾页";
                                        case "page":
                                            return page;
                                    }
                                },
                                onPageClicked:function (event, originalEvent, type, page) {
                                    $.ajax({
                                        url:'${pageContext.request.contextPath}/front/movie/searchWithQuery2',
                                        async:true,
                                        data:{country:country,year:year,type:types,pageNum:page},
                                        dataType: "json",
                                        success:function (data) {
                                            var html = template('temp1',{list:data.data.list});
                                            $('#movieList2').html(html);
                                        }
                                    })
                                },
                            });
                        }else{
                            $('#pagination22').hide();
                            $('#footer').addClass('fix');
                            $('#movieList2').html('<div style="margin-left: 30px;margin-top: 30px">暂无数据</div>');
                        }
                    }
                });
            });
            $('#yearTagsPlan li').click(function () {
                $('#pagination2').remove();
                $('#yearTagsPlan li').removeClass('active');
                $(this).addClass('active');
                NProgress.start();
                let country = $(this).parent().parent().prev().find('li.active').data("countryid");
                let types  = $(this).parent().parent().prev().prev().find('li.active a').text();
                if (types==="全部"){
                    types='';
                }
                let year = $(this).data("year");
                localStorage.setItem("planType",$(this).parent().parent().prev().prev().find('li.active').index());
                localStorage.setItem("planYear",$(this).index());
                localStorage.setItem("planCountry",$(this).parent().parent().prev().find('li.active').index());
                $.ajax({
                    url:'${pageContext.request.contextPath}/front/movie/searchWithQuery2',
                    async:true,
                    data:{country:country,year:year,type:types},
                    dataType: "json",
                    success:function (data) {
                        NProgress.done();
                        var html = template('temp1',{list:data.data.list});
                        $('#movieList2').html(html);
                        if(data.data.total!=0){
                            $('#footer').removeClass('fix');
                            $('#pagination22').show();
                            $('#pagination22').bootstrapPaginator({
                                //主版本号
                                bootstrapMajorVersion: 3,
                                //当前页
                                currentPage: data.data.pageNum,
                                //总页数
                                totalPages: data.data.pages,

                                //显示分页条信息
                                itemTexts: function (type, page, current) {
                                    switch (type) {
                                        case "first":
                                            return "首页";
                                        case "prev":
                                            return "上一页";
                                        case "next":
                                            return "下一页";
                                        case "last":
                                            return "尾页";
                                        case "page":
                                            return page;
                                    }
                                },
                                onPageClicked:function (event, originalEvent, type, page) {
                                    $.ajax({
                                        url:'${pageContext.request.contextPath}/front/movie/searchWithQuery2',
                                        async:true,
                                        data:{country:country,year:year,type:types,pageNum:page},
                                        dataType: "json",
                                        success:function (data) {
                                            var html = template('temp1',{list:data.data.list});
                                            $('#movieList2').html(html);
                                        }
                                    })
                                },
                            });
                        }else{
                            $('#pagination22').hide();
                            $('#footer').addClass('fix');
                            $('#movieList2').html('<div style="margin-left: 30px;margin-top: 30px">暂无数据</div>');
                        }
                    }
                });
            });
            $('#typeTagsClassic li').click(function () {
                $('#typeTagsClassic li').removeClass('active');
                $(this).addClass('active');
                NProgress.start();
                $('#pagination3').remove();
                let types = $(this).text();
                if (types==="全部"){
                    types='';
                }
                let country = $(this).parent().parent().next().find('li.active').data("countryid");
                let year = $(this).parent().parent().next().next().find('li.active').data("year");
                localStorage.setItem("goodType",$(this).index());
                localStorage.setItem("goodYear",$(this).parent().parent().next().next().find('li.active').index());
                localStorage.setItem("goodCountry",$(this).parent().parent().next().find('li.active').index());
                $.ajax({
                    url:'${pageContext.request.contextPath}/front/movie/searchWithQuery3',
                    async:true,
                    data:{country:country,year:year,type:types},
                    dataType: "json",
                    success:function (data) {
                        NProgress.done();
                        var html = template('temp1',{list:data.data.list});
                        $('#movieList3').html(html);
                        if(data.data.total!=0){
                            $('#footer').removeClass('fix');
                            $('#pagination33').show();
                            $('#pagination33').bootstrapPaginator({
                                //主版本号
                                bootstrapMajorVersion: 3,
                                //当前页
                                currentPage: data.data.pageNum,
                                //总页数
                                totalPages: data.data.pages,

                                //显示分页条信息
                                itemTexts: function (type, page, current) {
                                    switch (type) {
                                        case "first":
                                            return "首页";
                                        case "prev":
                                            return "上一页";
                                        case "next":
                                            return "下一页";
                                        case "last":
                                            return "尾页";
                                        case "page":
                                            return page;
                                    }
                                },
                                onPageClicked:function (event, originalEvent, type, page) {
                                    $.ajax({
                                        url:'${pageContext.request.contextPath}/front/movie/searchWithQuery3',
                                        async:true,
                                        data:{country:country,year:year,type:types,pageNum:page},
                                        dataType: "json",
                                        success:function (data) {
                                            var html = template('temp1',{list:data.data.list});
                                            $('#movieList3').html(html);
                                        }
                                    })
                                },
                            });
                        }else{
                            $('#pagination33').hide();
                            $('#footer').addClass('fix');
                            $('#movieList3').html('<div style="margin-left: 30px;margin-top: 30px">暂无数据</div>');
                        }
                    }
                })
            });
            $('#areaTagsClassic li').click(function () {
                $('#areaTagsClassic li').removeClass('active');
                $(this).addClass('active');
                $('#pagination3').remove();
                NProgress.start();
                let country = $(this).data("countryid");
                let types  = $(this).parent().parent().prev().find('li.active a').text();
                if (types==="全部"){
                    types='';
                }
                let year = $(this).parent().parent().next().find('li.active').data("year");
                localStorage.setItem("goodType",$(this).parent().parent().prev().find('li.active').index());
                localStorage.setItem("goodYear",$(this).parent().parent().next().find('li.active').index());
                localStorage.setItem("goodCountry",$(this).index());
                //console.log(types,country,year)
                $.ajax({
                    url:'${pageContext.request.contextPath}/front/movie/searchWithQuery3',
                    async:true,
                    data:{country:country,year:year,type:types},
                    dataType: "json",
                    success:function (data) {
                        NProgress.done();
                        var html = template('temp1',{list:data.data.list});
                        $('#movieList3').html(html);
                        if(data.data.total!=0){
                            $('#footer').removeClass('fix');
                            $('#pagination33').show();
                            $('#pagination33').bootstrapPaginator({
                                //主版本号
                                bootstrapMajorVersion: 3,
                                //当前页
                                currentPage: data.data.pageNum,
                                //总页数
                                totalPages: data.data.pages,

                                //显示分页条信息
                                itemTexts: function (type, page, current) {
                                    switch (type) {
                                        case "first":
                                            return "首页";
                                        case "prev":
                                            return "上一页";
                                        case "next":
                                            return "下一页";
                                        case "last":
                                            return "尾页";
                                        case "page":
                                            return page;
                                    }
                                },
                                onPageClicked:function (event, originalEvent, type, page) {
                                    $.ajax({
                                        url:'${pageContext.request.contextPath}/front/movie/searchWithQuery3',
                                        async:true,
                                        data:{country:country,year:year,type:types,pageNum:page},
                                        dataType: "json",
                                        success:function (data) {
                                            var html = template('temp1',{list:data.data.list});
                                            $('#movieList3').html(html);
                                        }
                                    })
                                },
                            });
                        }else{
                            $('#pagination33').hide();
                            $('#footer').addClass('fix');
                            $('#movieList3').html('<div style="margin-left: 30px;margin-top: 30px">暂无数据</div>');
                        }
                    }
                });
            });
            $('#yearTagsClassic li').click(function () {
                $('#yearTagsClassic li').removeClass('active');
                $(this).addClass('active');
                NProgress.start();
                $('#pagination3').remove();
                let country = $(this).parent().parent().prev().find('li.active').data("countryid");
                let types  = $(this).parent().parent().prev().prev().find('li.active a').text();
                if (types==="全部"){
                    types='';
                }
                let year = $(this).data("year");
                localStorage.setItem("goodType",$(this).parent().parent().prev().prev().find('li.active').index());
                localStorage.setItem("goodYear",$(this).index());
                localStorage.setItem("goodCountry",$(this).parent().parent().prev().find('li.active').index());
                $.ajax({
                    url:'${pageContext.request.contextPath}/front/movie/searchWithQuery3',
                    async:true,
                    data:{country:country,year:year,type:types},
                    dataType: "json",
                    success:function (data) {
                        NProgress.done();
                        var html = template('temp1',{list:data.data.list});
                        $('#movieList3').html(html);
                        if(data.data.total!=0){
                            $('#footer').removeClass('fix');
                            $('#pagination33').show();
                            $('#pagination33').bootstrapPaginator({
                                //主版本号
                                bootstrapMajorVersion: 3,
                                //当前页
                                currentPage: data.data.pageNum,
                                //总页数
                                totalPages: data.data.pages,

                                //显示分页条信息
                                itemTexts: function (type, page, current) {
                                    switch (type) {
                                        case "first":
                                            return "首页";
                                        case "prev":
                                            return "上一页";
                                        case "next":
                                            return "下一页";
                                        case "last":
                                            return "尾页";
                                        case "page":
                                            return page;
                                    }
                                },
                                onPageClicked:function (event, originalEvent, type, page) {
                                    $.ajax({
                                        url:'${pageContext.request.contextPath}/front/movie/searchWithQuery3',
                                        async:true,
                                        data:{country:country,year:year,type:types,pageNum:page},
                                        dataType: "json",
                                        success:function (data) {
                                            var html = template('temp1',{list:data.data.list});
                                            $('#movieList3').html(html);
                                        }
                                    })
                                },
                            });
                        }else{
                            $('#pagination33').hide();
                            $('#footer').addClass('fix');
                            $('#movieList3').html('<div style="margin-left: 30px;margin-top: 30px">暂无数据</div>');
                        }
                    }
                });
            });
            if((${hotList.total})==0){
                $('#pagination1').hide()
            }else{
                $('#pagination1').bootstrapPaginator({
                    //主版本号
                    bootstrapMajorVersion: 3,
                    //当前页
                    currentPage: ${hotList.pageNum},
                    //总页数
                    totalPages: ${hotList.pages},
                    //请求url
                    pageUrl: function (type, page, current) {
                        return '${pageContext.request.contextPath}/front/movie/movie?tab=0&pageNum='+page;
                    },
                    //显示分页条信息
                    itemTexts: function (type, page, current) {
                        switch (type) {
                            case "first":
                                return "首页";
                            case "prev":
                                return "上一页";
                            case "next":
                                return "下一页";
                            case "last":
                                return "尾页";
                            case "page":
                                return page;
                        }
                    },
                });
            }
            if((${planList.total})==0){
                $('#pagination2').hide()
            }else{
                $('#pagination2').bootstrapPaginator({
                    //主版本号
                    bootstrapMajorVersion: 3,
                    //当前页
                    currentPage: ${planList.pageNum},
                    //总页数
                    totalPages: ${planList.pages},
                    //请求url
                    pageUrl: function (type, page, current) {
                        return '${pageContext.request.contextPath}/front/movie/movie?tab=1&pageNum='+page;
                    },
                    //显示分页条信息
                    itemTexts: function (type, page, current) {
                        switch (type) {
                            case "first":
                                return "首页";
                            case "prev":
                                return "上一页";
                            case "next":
                                return "下一页";
                            case "last":
                                return "尾页";
                            case "page":
                                return page;
                        }
                    },
                });
            }
            if((${goodList.total})==0){
                $('#pagination3').hide()
            }else{
                $('#pagination3').bootstrapPaginator({
                    //主版本号
                    bootstrapMajorVersion: 3,
                    //当前页
                    currentPage: ${goodList.pageNum},
                    //总页数
                    totalPages: ${goodList.pages},
                    //请求url
                    pageUrl: function (type, page, current) {
                        return '${pageContext.request.contextPath}/front/movie/movie?tab=2&pageNum='+page;
                    },
                    //显示分页条信息
                    itemTexts: function (type, page, current) {
                        switch (type) {
                            case "first":
                                return "首页";
                            case "prev":
                                return "上一页";
                            case "next":
                                return "下一页";
                            case "last":
                                return "尾页";
                            case "page":
                                return page;
                        }
                    },
                });
            }
            function getUrlParam(name) {
                var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
                var r = window.location.search.substr(1).match(reg);
                if (r != null) return unescape(r[2]); return null;
            }
        })
    </script>
</head>
<body>
<%@ include file="header.jsp"%>
<div class="movie-container">
    <div class="subnav">
        <ul class="navbar">
            <li class="navbar-tab">
                <a class="active" href="javascript:void(0);">正在热映</a>
            </li>
            <li class="navbar-tab">
                <a href="javascript:void(0);">即将上映</a>
            </li>
            <li class="navbar-tab">
                <a href="javascript:void(0);">经典影片</a>
            </li>
        </ul>
    </div>
    <div class="movie-content">
        <div id="hotPlay">
            <div class="container">
                <div class="tags-panel">
                    <ul class="tags-lines">
                        <li class="tags-line">
                            <div class="tags-title">类型</div>
                            <ul class="tags" id="typeTagsHot">
                                <li class="active"><a href="javascript:void(0);">全部</a></li>
                                <c:forEach items="${data1}" var="item">
                                    <li><a href="javascript:void(0);">${item.type_name}</a></li>
                                </c:forEach>
                            </ul>
                        </li>
                        <li class="tags-line tags-line-border">
                            <div class="tags-title">区域</div>
                            <ul class="tags" id="areaTagsHot">
                                <li class="active" data-countryId=""><a href="javascript:void(0);" >全部</a></li>
                                <c:forEach items="${data3}" var="item">
                                    <li data-countryId="${item.country_id}"><a href="javascript:void(0);" >${item.country_name}</a></li>
                                </c:forEach>
                            </ul>
                        </li>
                        <li class="tags-line tags-line-border">
                            <div class="tags-title">年代</div>
                            <ul class="tags" id="yearTagsHot">
                                <li class="active" data-year=""><a href="javascript:void(0);" >全部</a></li>
                                <c:forEach items="${data2}" var="item">
                                    <li data-year="${item.year_id}"><a href="javascript:void(0);" >${item.year_name}</a></li>
                                </c:forEach>
                            </ul>
                        </li>
                    </ul>
                </div>
                <div class="movies-list">
                    <dl class="movie-list" id="movieList1">
                        <c:forEach items="${hotList.list}" var="item">
                            <dd>
                                <div class="movie-item">
                                    <a href="${pageContext.request.contextPath}/front/movie/movieDetail?id=${item.id}">
                                        <div class="movie-poster">
                                            <img src="${item.cover}" class="poster-default">
                                        </div>
                                    </a>
                                    <div class="movie-ver">
                                        <c:choose>
                                            <c:when test="${item.effect=='3D'}">
                                                <i class="m3d"></i>
                                            </c:when>
                                            <c:when test="${item.effect=='2DIMAX'}">
                                                <i class="imax2d"></i>
                                            </c:when>
                                            <c:when test="${item.effect=='3DIMAX'}">
                                                <i class="imax3d"></i>
                                            </c:when>
                                        </c:choose>
                                    </div>
                                </div>
                                <div class="channel-detail movie-item-title" >
                                    <a href="${pageContext.request.contextPath}/front/movie/movieDetail?id=${item.id}">${item.name}</a>
                                </div>
                                <div class="channel-detail channel-detail-orange">${item.want_count}人想看</div>
                            </dd>
                        </c:forEach>

                    </dl>
                </div>
                <nav style="text-align: center">
                    <ul class="detail-pager" id="pagination1" ></ul>
                    <ul class="detail-pager" id="pagination11" ></ul>
                </nav>
            </div>
        </div>
        <div id="planPlay">
            <div class="container">
                <div class="tags-panel">
                    <ul class="tags-lines">
                        <li class="tags-line">
                            <div class="tags-title">类型</div>
                            <ul class="tags" id="typeTagsPlan">
                                <li class="active"><a href="javascript:void(0);">全部</a></li>
                                <c:forEach items="${data1}" var="item">
                                    <li><a href="javascript:void(0);">${item.type_name}</a></li>
                                </c:forEach>
                            </ul>
                        </li>
                        <li class="tags-line tags-line-border">
                            <div class="tags-title">区域</div>
                            <ul class="tags" id="areaTagsPlan">
                                <li class="active" data-countryId=""><a href="javascript:void(0);">全部</a></li>
                                <c:forEach items="${data3}" var="item">
                                    <li data-countryId="${item.country_id}"><a href="javascript:void(0);">${item.country_name}</a></li>
                                </c:forEach>
                            </ul>
                        </li>
                        <li class="tags-line tags-line-border">
                            <div class="tags-title">年代</div>
                            <ul class="tags" id="yearTagsPlan">
                                <li class="active" data-year=""><a href="javascript:void(0);">全部</a></li>
                                <c:forEach items="${data2}" var="item">
                                    <li data-year="${item.year_id}"><a href="javascript:void(0);">${item.year_name}</a></li>
                                </c:forEach>
                            </ul>
                        </li>
                    </ul>
                </div>
                <div class="movies-list">
                    <dl class="movie-list" id="movieList2">
                        <c:forEach items="${planList.list}" var="item">
                            <dd>
                                <div class="movie-item">
                                    <a href="${pageContext.request.contextPath}/front/movie/movieDetail?id=${item.id}">
                                        <div class="movie-poster">
                                            <img src="${item.cover}" class="poster-default">
                                        </div>
                                    </a>
                                    <div class="movie-ver">
                                        <c:choose>
                                            <c:when test="${item.effect=='3D'}">
                                                <i class="m3d"></i>
                                            </c:when>
                                            <c:when test="${item.effect=='2DIMAX'}">
                                                <i class="imax2d"></i>
                                            </c:when>
                                            <c:when test="${item.effect=='3DIMAX'}">
                                                <i class="imax3d"></i>
                                            </c:when>
                                        </c:choose>
                                    </div>
                                </div>
                                <div class="channel-detail movie-item-title" >
                                    <a href="${pageContext.request.contextPath}/front/movie/movieDetail?id=${item.id}">${item.name}</a>
                                </div>
                                <div class="channel-detail channel-detail-orange">${item.want_count}人想看</div>
                            </dd>
                        </c:forEach>
                    </dl>
                </div>
                <nav style="text-align: center">
                    <ul class="detail-pager" id="pagination2" ></ul>
                    <ul class="detail-pager" id="pagination22" ></ul>
                </nav>
            </div>
        </div>
        <div id="classicPlay">
            <div class="container">
                <div class="tags-panel">
                    <ul class="tags-lines">
                        <li class="tags-line">
                            <div class="tags-title">类型</div>
                            <ul class="tags" id="typeTagsClassic">
                                <li class="active"><a href="javascript:void(0);">全部</a></li>
                                <c:forEach items="${data1}" var="item">
                                    <li><a href="javascript:void(0);">${item.type_name}</a></li>
                                </c:forEach>
                            </ul>
                        </li>
                        <li class="tags-line tags-line-border">
                            <div class="tags-title">区域</div>
                            <ul class="tags" id="areaTagsClassic">
                                <li class="active" data-countryId=""><a href="javascript:void(0);">全部</a></li>
                                <c:forEach items="${data3}" var="item">
                                    <li data-countryId="${item.country_id}"><a href="javascript:void(0);">${item.country_name}</a></li>
                                </c:forEach>
                            </ul>
                        </li>
                        <li class="tags-line tags-line-border">
                            <div class="tags-title">年代</div>
                            <ul class="tags" id="yearTagsClassic">
                                <li class="active" data-year=""><a href="javascript:void(0);">全部</a></li>
                                <c:forEach items="${data2}" var="item">
                                    <li data-year="${item.year_id}"><a href="javascript:void(0);">${item.year_name}</a></li>
                                </c:forEach>
                            </ul>
                        </li>
                    </ul>
                </div>
                <div class="movies-list">
                    <dl class="movie-list" id="movieList3">
                        <c:forEach items="${goodList.list}" var="item">
                            <dd>
                                <div class="movie-item">
                                    <a href="${pageContext.request.contextPath}/front/movie/movieDetail?id=${item.id}">
                                        <div class="movie-poster">
                                            <img src="${item.cover}" class="poster-default">
                                        </div>
                                    </a>
                                    <div class="movie-ver">
                                        <c:choose>
                                            <c:when test="${item.effect=='3D'}">
                                                <i class="m3d"></i>
                                            </c:when>
                                            <c:when test="${item.effect=='2DIMAX'}">
                                                <i class="imax2d"></i>
                                            </c:when>
                                            <c:when test="${item.effect=='3DIMAX'}">
                                                <i class="imax3d"></i>
                                            </c:when>
                                        </c:choose>
                                    </div>
                                </div>
                                <div class="channel-detail movie-item-title" >
                                    <a href="${pageContext.request.contextPath}/front/movie/movieDetail?id=${item.id}">${item.name}</a>
                                </div>
                                <div class="channel-detail channel-detail-orange">${item.want_count}人想看</div>
                            </dd>
                        </c:forEach>
                    </dl>
                </div>
                <nav style="text-align: center">
                    <ul class="detail-pager" id="pagination3" ></ul>
                    <ul class="detail-pager" id="pagination33" ></ul>
                </nav>
            </div>
        </div>
    </div>
</div>
<div class="footer" id="footer">
    <!--底部-->
    <span>©2020 i movie电影</span>
</div>
<script type="text/html" id="temp1">
    {{each list item index}}
    <dd>
        <div class="movie-item">
            <a href="/cinema-front/front/movie/movieDetail?id={{item.id}}">
                <div class="movie-poster">
                    <img src="{{item.cover}}" class="poster-default">
                </div>
            </a>
            <div class="movie-ver">
                {{if item.effect=='3D'}}
                <i class="m3d"></i>
                {{/if}}
                {{if item.effect=='2DIMAX'}}
                <i class="imax2d"></i>
                {{/if}}
                {{if item.effect=='3DIMAX'}}
                <i class="imax3d"></i>
                {{/if}}
            </div>
        </div>
        <div class="channel-detail movie-item-title" >
            <a href="/cinema-front/front/movie/movieDetail?id={{item.id}}">{{item.name}}</a>
        </div>
        <div class="channel-detail channel-detail-orange">{{item.want_count}}人想看</div>
    </dd>
    {{/each}}
</script>
</body>
</html>
